package com.fiveGroup.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fiveGroup.pojo.ProductReview;
import com.fiveGroup.pojo.vo.ProductReviewVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 86188
 * @description 针对表【product_review(商品评价表)】的数据库操作Mapper
 * @createDate 2025-09-26 15:01:12
 * @Entity com.fiveGroup.pojo.ProductReview
 */
public interface ProductReviewMapper extends BaseMapper<ProductReview> {

    // 查询某个商品的所有评论
    List<ProductReviewVo> selectByProductId(@Param("productId") Long productId);

    // 删除某个商品的评论
    int deleteReview(@Param("id") Long reviewId);

    // 新增一条评论
    int addReview(ProductReview productReview);
}




